package com.celeritymq.producer;

import javax.jms.DeliveryMode;
import javax.jms.JMSException;
import javax.jms.MessageProducer;

public abstract class CelerityMessageProducer implements MessageProducer {
	protected int deliveryMode = DeliveryMode.NON_PERSISTENT;
	protected boolean disableMessageId = false;
	protected boolean disableMessageTimestamp = false;
	protected int priority;
	protected long timeToLive;

	@Override
	public void close() throws JMSException {

	}

	@Override
	public int getDeliveryMode() throws JMSException {
		return deliveryMode;
	}

	@Override
	public boolean getDisableMessageID() throws JMSException {
		return disableMessageId;
	}

	@Override
	public boolean getDisableMessageTimestamp() throws JMSException {
		return disableMessageTimestamp;
	}

	@Override
	public int getPriority() throws JMSException {
		return priority;
	}

	@Override
	public long getTimeToLive() throws JMSException {
		return timeToLive;
	}

	@Override
	public void setDeliveryMode(int deliveryMode) throws JMSException {
		this.deliveryMode = deliveryMode;
	}

	@Override
	public void setDisableMessageID(boolean disableMessageId) throws JMSException {
		this.disableMessageId = disableMessageId;
	}

	@Override
	public void setDisableMessageTimestamp(boolean disableMessageTimestamp) throws JMSException {
		this.disableMessageTimestamp = disableMessageTimestamp;
	}

	@Override
	public void setPriority(int priority) throws JMSException {
		this.priority = priority;
	}

	@Override
	public void setTimeToLive(long timeToLive) throws JMSException {
		this.timeToLive = timeToLive;
	}

}
